<?php
include "../../templates/db/db.php";
$id = (int)$_GET['id'];


/* защита по ид */

if(!isset($id) || !is_numeric($id) || $id<1){
	echo "<h2>Немога да намера страницата..</h2>";
} else {

	$update = mysql_query("UPDATE termin_user SET chek='3' WHERE id='".$id."'");
	if($update) {
		?>
			<script type="text/javascript">
				alert("<p>Успешен запис!</p>");
			</script>
			<meta http-equiv="refresh" content="0;url=../check.php">
		<?php
	} else {
		?>
			<script type="text/javascript">
				alert("<p>Опсс нещо се обърка..</p>");
			</script>
			<meta http-equiv="refresh" content="0;url=../check.php">
		<?php
	}


}